package demo3;

import java.util.ArrayList;
import java.util.List;

public class test1 {
    public static void main(String[] args) {
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("abc");
        arrayList.add("mn");
        arrayList.add("jvof");
        System.out.println(arrayList);
        System.out.println("============");

        List<String> ret1 = arrayList.subList(1,3);
        ret1.set(0,"momo");
        System.out.println(ret1);
        System.out.println("============");

        List<String> list = new ArrayList<>();
        list.add("hello");
        list.addAll(arrayList);
        System.out.println(list);
        System.out.println("===========");

        boolean ret = list.remove("hello");
        System.out.println(ret);
        System.out.println(list);
        System.out.println("============");

        list.clear();
        System.out.println(list);


    }
}
